package com.shopping_back.common.enums;

public enum EmailTemplateEnum {
    REGISTRATION_CODE(
            "<html><body>您好，您的注册验证码是：<h1>%s</h1>，请在5分钟内完成注册。</body></html>",
            "注册验证码通知"
    );

    private final String template;
    private final String subject;

    EmailTemplateEnum(String template, String subject) {
        this.template = template;
        this.subject = subject;
    }

    public String getTemplate() {
        return template;
    }

    public String getSubject() {
        return subject;
    }

    public String format(String captcha) {
        return String.format(template, captcha);
    }
}